﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Demo.Api.Data;
using Demo.Api.Entities;
using Demo.Api.FlowEngines;
using Demo.Api.Models;
using KmFlow;
using KmFlow.AutoEngines;
using Microsoft.EntityFrameworkCore;

namespace Demo.Api.Services
{
    public class FlowChartProcessRepository : Repository<FlowChartProcessDo>
    {
        public FlowChartProcessRepository(DemoDbContext context) : base(context)
        {
            DataSet = Context.FlowChartProcesses;
        }

        public async Task<IEnumerable<FlowChartProcessDo>> GetsAsync(long affairProcessId)
        {
            return await DataSet.Where(x => x.AffairId == affairProcessId).ToListAsync();
        }


    }
}